package com.crealth.db;


import java.util.List;
import com.crealth.manager.MybatisManager;
import com.crealth.model.WeekPlanModel;

public class WeekPlanDb {
	public static WeekPlanModel selectUserWeekPlan(int userID) {	
		WeekPlanModel weekPlan = MybatisManager.weekPlanMapper.selectUserWeekPlan(userID);
		
		return weekPlan;
	}
	
	public static Integer insertWeekPlan(WeekPlanModel weekPlan) {		
		Integer res = MybatisManager.weekPlanMapper.insertWeekPlan(weekPlan);
		MybatisManager.commit();
		
		return res;
	}
	
	public static Integer updateWeekPlan(WeekPlanModel weekPlan) {		
		Integer res = MybatisManager.weekPlanMapper.updateWeekPlan(weekPlan);
		MybatisManager.commit();
		
		return res;
	}
	
	public static List<WeekPlanModel> selectTeamWeekPlanByIDs(String userIDs) {		
		List<WeekPlanModel> weekPlanls = MybatisManager.weekPlanMapper.selectTeamWeekPlanByIDs(userIDs);
		
		return weekPlanls;
	}
	
	public static List<WeekPlanModel> selectTeamWeekPlan() {		
		List<WeekPlanModel> weekPlanls = MybatisManager.weekPlanMapper.selectTeamWeekPlan();
		
		return weekPlanls;
	}
	
}
